package engine.BIEngine0_1;

import db.DBDruidManager;
import utils.Log4jInit;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;

public class PreparedStatementTest {
    public static void main(String[] args) throws SQLException {
        Connection connection = DBDruidManager.getConnection();
        String sql = "select * from algorithm where algorithm_id = ?";
        PreparedStatement preparedStatement = connection.prepareStatement(sql);
        String zhuanyi = "1'''' and 1=1 and 2=2";
        preparedStatement.setString(1,zhuanyi);
        Log4jInit.logger.info(preparedStatement.toString());
    }
}

